package com.Pratice;

import java.util.Arrays;
import java.util.Scanner;

public class MaxCharacter {

	public static void main(String[] args) {
		double sum = 0;
    	Scanner scan = new Scanner(System.in);
      	int len = scan.nextInt();
      	int[] a = new int[len];
      	for(int i = 0;i < len;i++){
          a[i] = scan.nextInt();
         sum += a[i];
        }
      	Arrays.sort(a);
      	System.out.println(a[len - 1]);
      	System.out.println(a[0]);
      	System.out.printf("%.2f",sum/len);
	}
}
